package com.llh.uua.model.dto

import com.llh.uua.validation.annotation.PasswordMatches
import com.llh.uua.validation.annotation.ValidPassword
import javax.validation.constraints.NotBlank
import javax.validation.constraints.NotNull
import javax.validation.constraints.Size

/**
 *
 * <p>Created At 2021/3/14 15:26
 * @author llh
 */
@PasswordMatches
data class UserDto(
    @field:NotNull
    @field:NotBlank
    @field:Size(min = 4, max = 50, message = "用户名长度必须在4到50个字符之间")
    val username: String,
    @field:NotNull
    @field:ValidPassword
    val password: String,
    @field:NotNull
    val matchingPassword: String,
    @field:NotNull
    val email: String,
)
